Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Wait to join consensus until synced with best peer #2020

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Oct 30, 2023

Description

This PR introduces a wait mechanism when starting the node in polybft, which stops the validator node from joining consensus until synced with best peer.

This helps stability and unnecessary network traffic, since validators that are syncing are proposing invalid blocks, until they sync up fully, and rejoin consensus.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal added the feature New update to Polygon Edge label Oct 30, 2023
@goran-ethernal goran-ethernal self-assigned this Oct 30, 2023
@goran-ethernal goran-ethernal marked this pull request as ready for review October 30, 2023 17:43
syncer/types.go Outdated Show resolved Hide resolved
e2e-polybft/e2e/consensus_test.go Show resolved Hide resolved
consensus/polybft/polybft.go Show resolved Hide resolved
syncer/syncer.go Outdated Show resolved Hide resolved
syncer/types.go Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants